package io.xxx.mario.risk;

import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.xxx.mario.message.MessageType;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 风控限流规则管理
 */
@Data
public class RiskRule {

    @TableId
    private Long id;

    private RiskType type;

    /**
     * 单位：分钟
     */
    private int timeUnit;

    private MessageType messageType;

    private int quantity;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updatedTime;
}
